﻿
using SportsPlatform.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace SportsPlatform.Dto.SportBusiness.Competition
{
    public class Clientlog
    {
        /// <summary>
        /// 赛事Id
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 赛事名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 所属商户
        /// </summary>
        public string Merchants { get; set; }

        /// <summary>
        /// 报名开始时间
        /// </summary>
        public DateTime SignUpBeginTime { get; set; }

        /// <summary>
        /// 报名结束时间
        /// </summary>
        public DateTime SingUpEndTime { get; set; }

        /// <summary>
        /// 比赛开始时间
        /// </summary>
        public DateTime MatchBeginTime { get; set; }

        /// <summary>
        /// 比赛结束时间
        /// </summary>
        public DateTime MatchEndTime { get; set; }

        /// <summary>
        /// 主办单位
        /// </summary>
        public string HostUnit { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        public string City { get; set; }

        /// <summary>
        /// 举办地点
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 举办详细地址
        /// </summary>
        public string DetailsAddress { get; set; }

        /// <summary>
        /// 报名时间
        /// </summary>
        public string SignTime { get; set; }

        /// <summary>
        /// 比赛时间
        /// </summary>
        public string MatchTime { get; set; }

        /// <summary>
        /// 赛事状态（0：关闭；1：待发布；2：报名未开始；3：正在报名；4：报名结束待比赛；5：正在比赛；6：比赛结束）
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 是否启用（0：禁用；1：启用）
        /// </summary>
        public int IsEnable { get; set; }

        /// <summary>
        /// 赛事状态Str
        /// </summary>
        public string StateStr
        {
            get
            {
                return State == (int)CompetitionStateEnum.关闭 ? "已关闭" : Enum.GetName(typeof(CompetitionStateEnum), State);
            }
        }

        /// <summary>
        /// 报名人数
        /// </summary>
        public int SignPeopleCount { get; set; }

        /// <summary>
        /// 比赛项目数
        /// </summary>
        public int ProjectCount { get; set; }

        /// <summary>
        /// 收费类型（1：按项目收费；2：按赛事收费）
        /// </summary>
        public int ChargeType { get; set; }


        /// <summary>
        /// 二维码地址
        /// </summary>
        public string QrCodeUrl { get; set; }
    }

    /// <summary>
    /// 获取未关闭的赛事列表传出参数
    /// 根据当前用户的公司ID获取用于新增报名时获取未关闭的赛事列表
    /// </summary>
    public class GetNotClosedCompetitionListDto
    {
        /// <summary>
        /// 赛事ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 赛事名称
        /// </summary>
        public string Name { get; set; }
    }
}
